<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    
</body>

<script>
    /*  
        instanceof  构造函数
    /*  判断对象是否可以使用构造函数实例化得到
    /*  判断在对象的原型链上能否找到构造函数的原型
    /*  对象.__proto__ ==构造函数.prototype
                                            */
    Object instanceof Function;//true
    function Person(username,age){
        this.username = username;
        this.age = age;
    }
    var p = new Person('zhangsan',25);
    console.log(p instanceof Person);//true
    console.log(p.__proto__ == Person.prototype);//true
    console.log(p.__proto__.__proto__ == Object.prototype);//true

    console.log(Math instanceof Function);//false
    console.log(JSON instanceof Function);//false
    console.log(Array instanceof Function);//true

</script>
</html>